package com.app.acitivty;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import com.app.activity.R;
import com.app.components.TopMenu;
import com.app.data.ScenicItem;
import com.app.service.BaseService;
import com.app.utils.GlobalConstants;

public class ScenicDetailActivity extends Activity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.scenic_detail);
		TopMenu topMenu = new TopMenu(this, "景点列表", new OnClickListener() {

			@Override
			public void onClick(View v) {
				ScenicDetailActivity.this.finish();
			}
		}, R.drawable.top_button_unselect, R.drawable.top_button_selected,
				"",80);
		topMenu.onCreate();
		
		ScenicItem item = GlobalConstants.getInstance().getScenicitem();
		
		ImageView imgView = (ImageView)findViewById(R.id.tvseniclogo);
		imgView.setImageBitmap(item.getIconbitmap());
		
		TextView priceView = (TextView)findViewById(R.id.tvsenicprice);
		priceView.setText(item.getSenicPrice());
		
		WebView webView =(WebView)findViewById(R.id.tvsenicwebview);
		webView.loadDataWithBaseURL(BaseService.url_base, item.getSenicIntro(), "text/html", "utf-8","www.lijiang.com");
	}

}
